package com.sojpt.boot.controller.business;

import com.jfinal.kit.Kv;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.Record;
import com.jfinal.plugin.activerecord.SqlPara;
import com.sojpt.boot.ui.iview.IViewController;
import com.sojpt.model.LkyApplyRecord;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description: 本类用于申请记录展示
 * Created by SMW on 2020/2/15 21:42
 */
@RestController
@RequestMapping("/admin/applyPage/")
public class LkyApplyPageAdminController extends IViewController {
    @GetMapping("list")
    public void list() {
        String uid=getPara("uid");
        SqlPara sqlPara = Db.getSqlPara("lky_apply_page.select", Kv.by("uid",uid));
        Page<Record> page = Db.paginate(pageNumber(), pageSize(), sqlPara);
        renderJson(page) ;
    }
}
